Fix CUR 2.0 query with valid column names#114
Merged
Conversation
SELECT * is not supported by BCM Data Exports. Column names retrieved from: aws bcm-data-exports get-table --table-name COST_AND_USAGE_REPORT with INCLUDE_RESOURCES=TRUE. Key difference from legacy CUR: resource_tags is a single map column, not separate resource_tags_user_* columns.
Terraform Plan🚧 Changes detected — Plan: 1 to add, 1 to change, 1 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Plan adds CUR data export and refactors CloudFront SSO redirect from function-based to S3 website redirect, with no security or data loss concerns.
|
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
## Summary
`SELECT *` is not supported by BCM Data Exports API — it returns
`ValidationException: Invalid QueryStatement`.
Column names retrieved directly from the API:
```
aws bcm-data-exports get-table --table-name COST_AND_USAGE_REPORT \
--table-properties '{"TIME_GRANULARITY":"DAILY","INCLUDE_RESOURCES":"TRUE",...}'
```
Key columns included: `line_item_resource_id`, `line_item_product_code`,
`line_item_unblended_cost`, `resource_tags` (single map column in CUR
2.0, not separate `resource_tags_user_*` columns like legacy CUR).
## Test plan
- [ ] CI plan + apply succeeds
- [ ] CUR export created in us-east-1 without validation error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SELECT *is not supported by BCM Data Exports API — it returnsValidationException: Invalid QueryStatement.Column names retrieved directly from the API:
Key columns included:
line_item_resource_id,line_item_product_code,line_item_unblended_cost,resource_tags(single map column in CUR 2.0, not separateresource_tags_user_*columns like legacy CUR).Test plan